package com.lishui.wateroj.model.pojo.dto;

import com.lishui.wateroj.contant.MessageConstant;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 用户登录请求体
 */
@Data
public class UserLoginDTO implements Serializable {

    private static final long serialVersionUID = 3191241716373120793L;

    /**
     * 用户账号
     */
    @NotEmpty(message = MessageConstant.ACCOUNT_IS_NULL)
    @Size(min = 5, max = 12, message = MessageConstant.ACCOUNT_LENGTH_ERROR)
    private String userAccount;

    /**
     * 用户密码
     */
    @NotEmpty(message = MessageConstant.PASSWORD_IS_NULL)
    @Size(min = 5, max = 15, message = MessageConstant.PASSWORD_LENGTH_ERROR)
    private String userPassword;

}
